/*

 @name    : 锅巴汉化 - Web汉化插件
 @author  : 麦子、JAR、小蓝、好阳光的小锅巴
 @version : V0.6.1 - 2019-07-09
 @website : http://www.g8hh.com

*/

//1.汉化杂项
var cnItems = {
    _OTHER_: [],

    //未分类：
    'store': '商店',
    '/Stopping': '/停止',
    '¢ More': '¢ 更多',
    '10% Faster': '快10%',
    'Achievements': '成就',
    '(Which is just one guy developing in the evenings after work.': '（只有一个人在下班后的晚上开发。',
    'Add Another': '加上另一个',
    'Android': '安卓系统',
    'as Believers': '作为信徒',
    'AutoStop': '自动停止',
    'AutoStop Elf': '自动停止小精灵',
    'Buyers': '购买者',
    'Auto Convert': '自动转换',
    'Auto Presents': '自动礼物',
    'AutoBuy': '自动购买',
    'Autobuy': '自动购买',
    'Autobuy Stores': '自动购买商店',
    'AutoSpin': '自动转动',
    'Automation': '自动化',
    'Automation Elves': '自动化精灵',
    'Automate Spinning': '自动旋转',
    'total': '总计',
    'Triple': '三倍',
    'Welcome!': '欢迎！',
    'Your next month requires': '下个月需要',
    'Stop Reel': '停止轮盘',
    'Stop-All Button': '全部停止按钮',
    'Stop-All Elf': '全部停止精灵',
    'StopSpeed Elf': '限速精灵',
    'Store Income': '商店收入',
    'Store Multi': '商店加成',
    'Store Upgrade': '商店升级',
    'Store Upgrades': '商店升级',
    'Stores': '商店',
    'To Wild': '狂野',
    'HOLIDAY SLOTS INC.': '假日抽奖公司',
    'Hpoints': '积分',
    'Presents': '礼物',
    'Present Multi': '礼物加成',
    'Requires all nights of Hanukkah and 20 Hanukkah Points': '需要整夜的光明节和20光明节积分',
    'Requires All Retain Upgrades': '需要所有保留升级',
    'Requires All Retirement Upgrades': '需要所有退休升级',
    'Requires AutoSpin': '需要自动旋转',
    'Requires AutoStop': '需要自动停止',
    'Retain': '保留',
    'Retain All': '全部保留',
    'Save to': '保存到',
    'Spin Reels': '旋转轮盘',
    'Spin/Stop': '旋转/停止',
    'I hope you like this holiday ‘spin off’ of my previous game!': '希望您喜欢这个假期，是我以前游戏的“衍生品”！',
    'If you enjoyed this game, please do let me know!': '如果您喜欢这个游戏，请告诉我！',
    'This version adds a few new upgrades and new mechanisms like Prestige Multi-Buy and New Game+.': '这个版本增加了一些新的升级和新的机制，例如声望加成购买和新游戏+新机制。',
    'Please let me know in the forums/comments if you run into any bugs or want any other features, and have a great holiday season!!': '如果您遇到任何错误或想要任何其他功能，并度过一个愉快的假期，请在论坛/评论中告知我！',
    'Payout List available in info/settings menu': '信息/设置菜单中的付款列表',
    'Now I\'m a Believer, No Doubt in My Mind': '现在我是一个信徒，毫无疑问',
    'Upgrades': '升级',
    'Upgrade': '升级',
    'You are ready for your first upgrades': '您已经准备好进行第一次升级',
    'You Can Now Get a Store': '现在，您可以得到一个商店',
    'Upgrades allow you to increase the number of presents you get from spins and automate the spinning process.': '升级使您可以增加从旋转中获得的礼物数量，并使纺纱过程自动化。',
    'With Everyone as a Believer': '与所有人一起信奉',
    'The North Pole icon in the bottom-left will light up when upgrades are available.': '升级可用时，左下方的北极图标将点亮。',
    'Ok': '确定',
//    'On': '开启',
    'Payouts': '支出',
    'Names': '名称',
    'Numbers': '编号',
    'New Game+': '新游戏+',
    'New Game+ is Optional, Just To Let You Replay.': '新游戏+是可选的，只是为了让你重玩。',
    'Cost': '成本',
    'Cost: $': '成本: $',
    'Convert': '转换',
    'Confirm': '确认',
    'Donations': '捐助',
    'Double Presents': '双重礼物',
    'Earn': '赚取',
    'Elara\'s Delight': '埃拉拉的喜悦',
    'Game': '游戏',
    'Get this one': '得到这个',
    'Get Presents': '得到礼物',
    'Gives Points Equal to One 4 Reel Match': '给出等于一个4连匹配的积分',
    'Active Gambler': '活跃的赌徒',
    'After Conversion': '转换后',
    'After Others': '其它之后',
    'After Store\'': '售后',
    'Another Hanukkah Point requires $': '光明节的另一个积分要求$',
    'AutoBuyers': '自动购买者',
    'AutoDelivers Presents With No Reset': '自动发送礼物，没有重置',
    'AutoDelivery': '自动配送',
    'AutoGet HPoints': '自动获取积分',
    'AutoGet Stores': '自动获取商店',
    'AutoSpin Elf': '自动旋转精灵',
    'Available Upgrades': '可用升级',
    'Basic Payouts': '基础支出',
    'Believer Alerts': '信徒提醒',
    'Believer Upgrades': '升级',
    'Believers': '信徒',
    'Believers are needed for': '需要信徒',
    'Best 1st Buy, Removes Need for Believer Reset': '最好先买1个，无需信徒重置',
    'Buy Multiple': '批量购买',
    'Buy Toy Store': '购买玩具商店',
    'Buys AutoSpin': '购买自动旋转',
    'Buys AutoStop': '购买自动停止',
    'Buys Doubler': '购买双倍',
    'Buys FlakeChange': '购买周转率',
    'Buys Lines': '购买线',
    'Buys Stop-All': '购买全部停止',
    'Buys StopSpeed': '购买停止速度',
    'Buys Tripler': '购买三倍',
    'Cancel': '取消',
    'Change Snowflake': '更改雪花',
    'Classic Holiday Capitalism': '经典假日资本主义',
    'Cloud': '云端',
    'Coming Soon': '敬请期待',
    'Conversion': '转换次数',
    'Convert and': '转换并',
    'Current Believers': '目前的信徒',
    'Current Multi': '当前加成',
    'Currently Each Unused ToyStore Income Dollar, HPoint, and Productive Month additively increase points by': '当前，每个未使用的玩具店收入，积分和生产月收入分别增加点数',
    'Deliver Gifts': '发送礼物',
    'Deliver To Get': '交付获得',
    'Don\'t Need That Menu Anymore': '不再需要该菜单',
    'Double Store Income': '双重商店收入',
    'Doubler Elf': '加倍精灵',
    'Enable': '启用',
    'Extra Income: $': '额外收入:$',
    'for 1 HPoints': '1积分',
    'For Hpoints': '积分',
    'Forever': '永远',
    'From Goy to Joy': '从Goy到Joy',
    'Full Retirement': '完全退休',
    'Fully Resets the Game With a Believer Multiplier Equal to the Sqrt of Your Total Months': '完全重置游戏，乘数等于你所有月份的平方根',
    'Game so Nice You Played it Twice': '游戏太棒了，你玩了两次',
    'Get': '获取',
    'Hanukkah Alerts': '光明节提醒',
    'Hanukkah Sameach!': '光明节快乐',
    'Hanukkah Upgrades': '光明节升级',
    'Happy Holidays': '节日快乐',
    'Have a Great Holiday Season!!': '假期愉快!!',
    'He Knows When You\'re Awake': '他知道你什么时候醒',
    'He Sees You When You\'re Idling': '当你闲着的时候，他会看到你',
    'Hindsight is 20-': '后见之明是20-',
    'Hold down upgrade button to buy multiple': '按住升级按钮购买多个',
    'HPoints To AutoGet': '积分自动获取',
    'Humans': '人类',
    'Includes Stop-All Elf': '包括全部停止精灵',
    'It Still Isn\'t An Idle, Makopaz': 'Makopaz，它仍然不是一个放置',
    'Jack Frost of All Trades': '天下无难事，只怕有心人',
    'Jingle Bells': '铃儿响叮当',
    'K a year (': 'K 1年 (',
    'Keep All': '全部保留',
    'Keeping Your Resolutions': '保持您的决心',
    'Keeps Achievements, Bonus Multiplies On Repeat': '保持成就，奖金成倍增加',
    'Lines Elf': '线条精灵',
    'Load From': '加载从',
    'Makopaz Got 68x More This Week': 'Makopaz本周获得68倍多',
    'Makopaz- Got 8.3e5x More This Week': 'Makopaz-本周获得8.3e5x多',
    'Max 3, Adds Customization to AutoConversion.': '最大值3，将自定义项添加到自动转换。',
    'Max 5, Each costs': '最多5个，每个费用',
    'Menorah Multi': '烛台加成',
    'Mixed': '混合',
    'Months': '月',
    'More Info/Settings': '更多信息/设置',
    'more per min': '更多每分钟',
    'more total Hpoints': '更多总积分',
    'Multi': '加成',
    'Multi-HPoint': '加成积分',
    'Multiple Stores': '多个商店',
    'My Finger Hurts': '我的手指好痛',
    'Next Hanukkah point requires at least $': '下一个光明节积分至少需要$',
    'Night': '夜晚',
    'On Store Reset': '店内重置',
    'Per Store Forever': '每家店永远',
    'Popup': '弹出',
    'Presents and Accounted For': '礼物和计算',
    'Productive Months': '生产月',
    'Requires Night 2, Customizable and Toggleable.': '需要夜2，可定制和可切换。',
    'Requires Retain Multiple Stores Purchase': '需要保留多个商店的购买',
    'Retain Lines &': '保留线条和',
    'Retire for': '退休',
    'Retirement Upgrades': '退休升级',
    'RPA: Robotic Present Automation': 'RPA：目前的机器人自动化',
    'Salary: $': '工资：$',
    'Spin': '转动',
    'Start the Next Store with (25*Multis) Presents': '以（25 * 倍数）礼物开始下一家商店',
    'Stop All Reels': '停止所有轮盘',
    'Stores To AutoBuy': '自动购买商店',
    'Swing and a Misstletoe': '秋千和槲寄生',
    'Thank You So Much for Playing!': '非常感谢你的参与!',
    'That SnowFlake was Ugly Anyway': '不管怎么说，那片雪花很丑',
    'times more than last.': '比上次多很多倍。',
    'To Unlock Toy Stores,': '要解锁玩具商店，',
    'Total Present Multiplier': '当前总计加成',
    'Toy Stores': '玩具商店',
    'ToyStore Alerts': '玩具商店提醒',
    'Triple Believers': '三倍信徒',
    'Triple Presents': '三倍礼物',
    'Tripler Elf': '三倍精灵',
    'Version': '版本',
    'WildFlake Elf': '野生精灵',
    'Wildflake Elves': '野生精灵',
    'Will Earn: $': '将获得:$',
    'Win Line': '胜利线',
    'x Presents': 'x 礼物',
//    'Off': '关闭',
    'Scientific': '科学计数法',
    'By delivering presents you reset your progress but can get upgrades that help you push even further toward the next stage: Toy Stores.': '通过提供礼物，您可以重置进度，但可以得到升级，从而帮助您进一步迈向下一阶段：玩具商店。',
    'Feel free to do this now, or wait longer until you have more to get!': '立即进行此操作，或者等待更长的时间，直到获得更多！',
    'The sleigh in the bottom menu will light up when you are able to get upgrades by delivering.': '当您能够通过交付获得升级时，底部菜单中的雪橇将亮起。',
    'You are ready to deliver your presents and get believers.': '您准备好交付礼物并得到信徒。',
    'Are you sure you would like to': '您确定要',
    'This popup can be disabled in settings': '可以在设置中禁用此弹出窗口',
    'Prestige': '声望',
    'Max Speed': '已达最高速度',
    'Welcome Back!': '欢迎回来！',
    'Offline Progress': '离线进度',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',

    //原样
    '': '',
    '': '',

}


//需处理的前缀
var cnPrefix = {
    "(-": "(-",
    "(+": "(+",
    "(": "(",
    "-": "-",
    "+": "+",
    " ": " ",
    ": ": "： ",
}

//需处理的后缀
var cnPostfix = {
    ":": "：",
    "：": "：",
    ": ": "： ",
    "： ": "： ",
    " ": "",
    "/s)": "/s)",
    "/s": "/s",
    ")": ")",
    "%": "%",
}

//需排除的，正则匹配
var cnExcludeWhole = [
    /^x?\d+(\.\d+)?[A-Za-z%]{0,2}(\s.C)?\s*$/, //12.34K,23.4 °C
    /^x?\d+(\.\d+)?(e[+\-]?\d+)?\s*$/, //12.34e+4
    /^\s*$/, //纯空格
    /^\d+(\.\d+)?[A-Za-z]{0,2}.?\(?([+\-]?(\d+(\.\d+)?[A-Za-z]{0,2})?)?$/, //12.34M (+34.34K
    /^(\d+(\.\d+)?[A-Za-z]{0,2}\/s)?.?\(?([+\-]?\d+(\.\d+)?[A-Za-z]{0,2})?\/s\stot$/, //2.74M/s (112.4K/s tot
    /^\d+(\.\d+)?(e[+\-]?\d+)?.?\(?([+\-]?(\d+(\.\d+)?(e[+\-]?\d+)?)?)?$/, //2.177e+6 (+4.01+4
    /^(\d+(\.\d+)?(e[+\-]?\d+)?\/s)?.?\(?([+\-]?(\d+(\.\d+)?(e[+\-]?\d+)?)?)?\/s\stot$/, //2.177e+6/s (+4.01+4/s tot
];
var cnExcludePostfix = [
    /:?\s*x?\d+(\.\d+)?(e[+\-]?\d+)?\s*$/, //12.34e+4
    /:?\s*x?\d+(\.\d+)?[A-Za-z]{0,2}$/, //: 12.34K, x1.5
]

//正则替换，带数字的固定格式句子
//纯数字：(\d+)
//逗号：([\d\.,]+)
//小数点：([\d\.]+)
//原样输出的字段：(.+)
var cnRegReplace = new Map([
    [/^\n(.+)Santa\'s Sleigh\n(.+)$/, '圣诞老人的雪橇'],
    [/^\n(.+)Toy Store Ownership\n(.+)$/, '玩具店所有权'],
    [/^\n(.+)Workshop\n(.+)$/, '工作台'],
    [/^\n(.+)\(Game AutoSaves Locally, Cloud Saves are limited to Kongregate\)\n(.+)$/, '\(游戏自动保存本地，云存储仅限于Kongregate\)'],
    [/^\n(.+)No Cloud Save Detected\n(.+)$/, '未检测到云存档'],
    [/^\n(.+)Match (.+): (.+) points$/, '匹配$2: $3分'],
    [/^\n(.+)Each conversion provides 1 powerful Hanukkah point\n(.+)$/, '每个转换提供1个强大的光明节点'],
    [/^\n(.+)Yearly Retirement\n(.+)$/, '年度退休'],
    [/^\n(.+)With all your success delivering gifts to the people of the world, you decide to use your excess gifts to start a fully stocked toy store run by your elves and finally make some money from your hard work.\n(.+)$/, '在您成功地向全世界人民提供礼物的过程中，您决定使用多余的礼物来建立由精灵经营的储备充足的玩具商店，并最终从辛勤工作中赚钱。'],
    [/^\n(.+)Next store earns \$$/, '下一家商店的收入为\$'],
    [/^\n(.+)Deliver gifts to the children of the world, the more gifts you give them, the more of them will believe you exist.\n(.+)$/, '向世界各地的孩子们分发礼物，您给他们的礼物越多，他们就会越相信您的存在。'],
    [/^\n(.+)After all your Christmas efforts, you realize you would throw it all away for just one night of Hanukkah... so that’s exactly what you do.\n(.+)$/, '经过所有的圣诞节努力，您意识到您将把所有光明节一整晚都丢掉了……所以这就是您要做的。'],
    [/^\n(.+)As the year winds down, you plan out your next 11 months of retirement before it all starts again.\n(.+)$/, '随着一年的结束，您需要计划接下来的11个月的退休生活，然后再重新开始。'],
    [/^\n(.+)Earn achievements through gameplay which provide an additive 5% present bonus from unused ToyStore Income, Hpoints, and Productive Months!\n(.+)$/, '通过游戏赚取成就，这些成就可从未使用的玩具店收入，积分和生产月中获得5％的额外当前奖励！'],
    [/^\n(.+)Learn from your work and take presents apart to make future ones better!\n(.+)$/, '从你的工作中学习，把礼物拆开，让未来的更好!'],
    [/^\n(.+)Payouts are determined by how many of matches you get in a line\n(.+)$/, '奖金是由你在一行中找到多少匹配项决定的'],
    [/^\n(.+)Achievements$/, '成就'],
    [/^\n(.+)Net Income: \$$/, '净收入: \$'],
    [/^\n(.+)Savings: \$$/, '节省: \$'],
    [/^\n(.+)Payouts are determined by how many of the same icon you get.$/, '支出取决于您获得多少个相同的图标。'],
    [/^\n(.+)This game was developed by Makopaz Games.$/, '该游戏是由Makopaz Games开发的。'],
    [/^\n(.+)Productive Months$/, '生产月'],
    [/^\n(.+)Total Bonus$/, '总奖励'],
    [/^\n(.+)Total Hanukkah Points$/, '光明节总积分'],
    [/^\n(.+)Achievements\n(.+)$/, '成就'],
    [/^\n(.+)Hanukkah\n(.+)$/, '光明节'],
    [/^\n(.+)Info\n(.+)$/, '信息'],
    [/^You were offline for (.+) Minutes. You earned (.+) of your Store Income and gained: \$$/, '您离线了$1分钟。 您获得了$2的商店收入，并且获得了：\$'],
    [/^deliver gifts to get (.+) Believers$/, '送礼物可获得$1位信徒'],
    [/^Ex: Month 4 requires 30, Month 5 requires 40, etc.\)\n\n(.+)$/, '例如：第4个月需要30，第5个月需要40，依此类推）'],
    [/^First 3 need 20 HPoints total, each after needs 10 more\)\n(.+)$/, '前3个需要总计20点，之后每个需要10个积分）'],
    [/^More can be earned with Retirement Upgrades\n(.+)$/, '退休升级可赚取更多'],
    [/^Nights do not have to be obtained in order\n(.+)$/, '夜晚并不一定要有秩序'],
    [/^x\n(.+)$/, 'x'],
    [/^You can get multiple payouts per card.\n(.+)$/, '您每张卡可以获得多笔付款。'],
    [/^\n(.+)Payouts\n(.+)$/, '支出'],
    [/^\n(.+)Current Hanukkah Points$/, '光明节当前积分'],
    [/^Any and all donations are greatly appreciated.\n(.+)$/, '任何和所有捐赠都将不胜感激。'],
    [/^¢\/min\)\n(.+)$/, '¢\/分钟\)'],
    [/^\/min\n(.+)$/, '\/分钟'],

]);
